1 /* 2 Copyright: Marcelo S. N. Mancini (Hipreme|MrcSnm), 2018 - 2021 3 License: [https://creativecommons.org/licenses/by/4.0/|CC BY-4.0 License]. 4 Authors: Marcelo S. N. Mancini 5 6 Copyright Marcelo S. N. Mancini 2018 - 2021. 7 Distributed under the CC BY-4.0 License. 8 (See accompanying file LICENSE.txt or copy at 9 https://creativecommons.org/licenses/by/4.0/ 10 */ 11 /** 12 * This module is used for mantaining global options related to the engine 13 */ 14 module hip.config.opts; 15 16 /** 17 * Use that for mainly mantaining engine related debug things 18 */ 19 enum HIP_DEBUG = true; 20 21 /** 22 * Will call HipRenderer.exitOnError for each glCall 23 */ 24 enum HIP_DEBUG_GL = true; 25 26 /** 27 * Will call HipRenderer.exitOnError for each glCall. 28 * WebGL has a bizarre glGetError in terms of performance, it can degradate it alone. This will possibily never be enabled. 29 */ 30 enum HIP_DEBUG_WEBGL = false; 31 32 /** 33 * Used for disabling every engine log function 34 */ 35 enum HE_NO_LOG = false; 36 37 /** 38 * Used to track calls to find where the print call is located. 39 */ 40 enum HIP_TRACK_HIPLOG = false; 41 42 /** 43 * Mantain only error related logging 44 */ 45 enum HE_ERR_ONLY = false; 46 47 ///Unused yet? 48 enum HIP_OPTIMIZE = false; 49 50 ///Default time in millis to restart the click count on Mouse and Keyboard 51 enum HIP_DEFAULT_TIME_UNTIL_CLICK_COUNT_RESTART = 400; 52 53 ///////////////////////////////// Default Asset Files ///////////////////////////////// 54 enum HIP_ASSETMANAGER_WORKER_POOL = 8; 55 enum HIP_DEFAULT_FONT = "defaults/fonts/WarsawGothic-BnBV.otf"; 56 enum HIP_DEFAULT_FONT_SIZE = 32; 57 enum HIP_DEFAULT_TEXTURE = "defaults/graphics/sprites/default.png"; 58 59 /** 60 * Will use OpenSL ES optimal sample rate for output and buffer size multiple. 61 */ 62 enum HIP_OPENSLES_OPTIMAL = true; 63 64 /** 65 * Beware that a lot of effects are disabled on Android when using low latency, aka Fast Mixer. 66 * So, it is better to have a deep thought before allowing its low latency. 67 * You will also lose sample rate conversion, so it is a lot problematic. Until there's a hand made sample 68 * converter, it will be almost impossible to use. 69 * 70 * The following interfaces are unsupported on the fast mixer: 71 * 72 * - SL_IID_BASSBOOST 73 * 74 * - SL_IID_EFFECTSEND 75 * 76 * - SL_IID_ENVIRONMENTALREVERB 77 * 78 * - SL_IID_EQUALIZER 79 * 80 * - SL_IID_PLAYBACKRATE 81 * 82 * - SL_IID_PRESETREVERB 83 * 84 * - SL_IID_VIRTUALIZER 85 * 86 * - SL_IID_ANDROIDEFFECT 87 * 88 * - SL_IID_ANDROIDEFFECTSEND 89 * 90 */ 91 enum HIP_OPENSLES_FAST_MIXER = false; 92 93 94 95 static if(HIP_OPENSLES_FAST_MIXER) 96 { 97 static assert(HIP_OPENSLES_OPTIMAL, "Can't use OpenSL ES fast mixer without using its optimal 98 buffer size and sample rate"); 99 }